ÄúµÄλÖãºÑ°ÃÎÍøÊ×Ò³£¾±à³ÌÀÖÔ°£¾VBScript£¾VBScript


objects constants operators statements functions properties methods






FUNCTION:  Sgn()

Sgn(Number)

The Sgn function returns the sign of a number.

-1 indicates a negative number.
 0 indicates the number zero.
 1 indicates a positive number.

Code:
<% =Sgn(-127.89) %>

Output:
-1

Code:
<% =Sgn(0) %>

Output:
0

Code:
<% =Sgn(127.89) %>

Output:
1